<div class="inner-form">
	<div class="box box-100">
		<div class="boxin">
			<div class="header">
				<h1>Flags</h1>
				<a class="button altbutton" href="/backoffice/flag/create">Add flag</a>
			</div>
			
			<div class="content">
                <table width="100%">
                    <?php if (count($this->flags)) { ?>
                    	<thead>
                            <tr>
                        		<th>Name</th>
                        		<th>Description</th>
                        		<th>Active on production</th>
                        		<th>Active on development</th>
                        		<td class="tc last">Actions</td>
                        	</tr>
                    	</thead>

						<tbody>
                            <?php foreach ($this->flags as $flag) { ?>
                                <tr>
                            		<td><?= $flag->getName()?></td>
                            		<td><?= $flag->getDescription()?></td>
                            		<td><?= $this->tick($flag->isActiveOnProduction()) ?></td>
                            		<td><?= $this->tick($flag->isActiveOnDev()) ?></td>
                            		<td class="tc last">
                            			<ul class="actions">
                            				<li><a class="ico" title="Toggle Production" href="/backoffice/flag/toggle/zone/prod/id/<?= $flag->getId() ?>"><img alt="toggle prod" src="/images/fff/computer.png" /></a></li>
                            				<li><a class="ico" title="Toggle Development" href="/backoffice/flag/toggle/zone/dev/id/<?= $flag->getId() ?>"><img alt="toggle dev" src="/images/fff/bomb.png" /></a></li>
                            				<li><a class="ico" title="Edit" href="/backoffice/flag/update/id/<?= $flag->getId() ?>"><img alt="edit" src="/images/fff/pencil.png" /></a></li>
                            				<li><a class="ico" title="Delete" href="/backoffice/flag/delete/id/<?= $flag->getId() ?>"><img alt="delete" src="/images/fff/cross.png" /></a></li>
                        				</ul>
                    				</td>
                            	</tr>
                            <?php } ?>
                        </tbody>
                    <?php } ?>
                </table>
                <?php
                    echo $this->paginationControl($this->flags,
                                                  'Sliding',
                                                  'partials/pagination.phtml');
                ?>
            </div>
        </div>
    </div>
</div>